<?php


namespace app\common\model;


use think\Model;

class Gift extends Model
{
    public function getImgAttr($value)
    {
        if ($value) {
            return request()->domain().$value;
        }
    }

    public function content()
    {
        return $this->hasMany('GiftContent', 'gift_id', 'id');
    }
}